function inheritPrototype(subClass, superClass) {
    let p = Object.create(superClass.prototype);
    p.constructor = subClass;
    subClass.prototype = p;
}
function SuperClass(name) {
    this.name = name;
    this.colors = ['red', 'blue', 'green'];
}
SuperClass.prototype.getName = function () {
    console.log(this.name);
};
function SubClass(name, time) {
    SuperClass.call(this, name);
    this.time = time;
}
inheritPrototype(SubClass, SuperClass);
SubClass.prototype.getTime = function () {
    console.log(this.time);
};
let instance1 = new SubClass('js book', 2014);
let instance2 = new SubClass('css book', 2013);
instance1.colors.push('black');
console.log(instance1.colors, instance2.colors);
instance2.getName();
instance2.getTime();